<include file="Public/min-header"/>
<div class="wrapper">
    <section class="content">
        <div class="navbar navbar-default">
            <form action="{:U('fenpei_admin')}" id="search-form2" class="navbar-form form-inline" method="post">
                <input name="id" type="hidden" value="{$info.id}">
                <div class="form-group">

                    <label for="sales_id">选择业务员:</label>
                    <select name="sales_id" id="sales_id" class="form-control" style="width: 300px;">
                        <option value="">选择业务员</option>
                        <foreach name="lists" item="v" key="k" >
                            <option value="{$v['id']}" <if condition="$v[id] eq $order[sales_id]">selected</if> >{$v['name']}</option>
                        </foreach>
                    </select>
                </div>

                <button type="button" id="but1" class="btn btn-primary" onclick="sub_form()"> 提交</button>
            </form>
        </div>
    </section>
    <script>
        function sub_form(){
            var sales_id = $('#sales_id').val();
            if(!sales_id){
                alert('请选择业务员');
                return false;
            }else{
                $('#search-form2').submit();


//                $.ajax({
//                    type : "POST",
//                    url:"/index.php?m=Admin&c=Askbuy&a=fenpei_admin",//+tab,
//                    data : $('#search-form2').serialize(),// 你的formid
//                    success: function(){
//                        window.parent.location.reload();
//                        parent.layer.closeAll('iframe');
//                    }
//                });
            }

        }

        function reloadparent()
        {

            window.top.frame0.location.reload();
            window.top.closeDialog(1);
        }

    </script>

</div>
</body>
</html>